using System.Collections;
using System.Collections.Generic;
using QFramework;
using UnityEngine;

namespace QFramework.Example
{
    public class SaveSystem : AbstractSystem
    {
        protected override void OnInit()
        {

        }

        public void OnSave()
        {

        }

        public void OnLoad()
        {

        }

        public void OnSaveBool(string key, bool flag)
        {
            PlayerPrefs.SetInt(key, flag ? 1 : 0);
        }

        public bool OnLoadBool(string key, bool flag = false)
        {
            return PlayerPrefs.GetInt(key, flag ? 1 : 0) == 1;
        }
    }
}
